package cn.edu.pku.ss.lbs.location;

import java.util.ArrayList;
import java.util.List;

public class TargetDatabase {
    private List<Target> targetList = new ArrayList<Target>();

    public TargetDatabase() {
        targetList.add(new Target("Xu", "00:1F:DF:FF:BF:65"));
    }

    public Target getTargetById(String id) {
        for (Target target : targetList) {
            if (target.getId().equals(id)) return target;
        }
        return null;
    }

    public Target getTargetByTerminal(String terminalId) {
        for (Target target : targetList) {
            if (target.getTerminalId().equals(terminalId)) return target;
        }
        return null;
    }
}
